package com.xinqi.modules.prepare.common.dto.input;

import com.xinqi.common.base.dto.QuestionBaseDTO;
import com.xinqi.modules.prepare.prepare.enums.PrepareVideoPointTypeEnum;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

/**
 * 备课区互动视频-数据对象
 *
 * @author: linkai
 * @date: 2023/04/12
 */
@Data
@Schema(description = "备课区互动视频-数据对象")
public class PrepareImportVideoData implements Serializable {
    /**
     * 主键
     */
    @Schema(description = "id", example = "")
    private Long id;
    /**
     * 名称
     */
    @Schema(description = "名称", example = "")
    private String name;
    /**
     * 内容
     */
    @Schema(description = "内容", example = "")
    private String content;
    /**
     * 时长(秒)
     */
    @Schema(description = "时长(秒)", example = "")
    private Integer duration;
    /**
     * 文件类型
     */
    @Schema(description = "文件类型", example = "")
    private PrepareVideoPointTypeEnum fileType;

    /**
     * 文件地址
     */
    @Schema(description = "文件地址-临时", example = "")
    private String fileUrls;

    /**
     * 备课区互动视频环节-数据对象
     *
     * @author: linkai
     * @date: 2023/04/12
     */
    @Data
    @Schema(description = "备课区互动视频环节-数据对象")
    public static class PrepareImportVideoPointData implements Serializable {

        /**
         * 主键
         */
        @Schema(description = "id", example = "")
        private Long id;

        /**
         * 互动视频id
         */
        @Schema(description = "互动视频id", example = "")
        private Long videoId;

        /**
         * 名称
         */
        @Schema(description = "名称", example = "")
        private String name;
        /**
         * 帧类型
         */
        @Schema(description = "互动视频帧类型，QUESTION:试题；IMAGE:图片；DOCUMENT:文档；", example = "QUESTION")
        @NotNull(message = "互动视频帧类型不能为空")
        private PrepareVideoPointTypeEnum pointType;
        /**
         * 环节时间点
         */
        @Schema(description = "环节时间点", example = "")
        private BigDecimal pointTime;
        /**
         * 环节序号
         */
        @Schema(description = "环节序号", example = "")
        private Integer pointNumber;

        /**
         * 切片文件路径
         */
        @Schema(description = "切片文件路径", example = "")
        private String fileUrl;

        /**
         * 互动试题
         */
        @Schema(description = "互动试题", example = "")
        private List<QuestionBaseDTO> questions;

    }

}
